<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../js库/mock.js"></script>
    <script src="../../js库/vue.js"></script>
    <title>土豆网案例</title>
    <style>
        * {
            margin: 0;padding: 0;
        }

        /* 
        原来有个盒子默认隐藏 当鼠标经过大盒子就显示
        */
        #root {
            width: 700px;
            height: 500px;
            background-color: pink;
            margin: 100px auto;
        }
        img {
            width: 100%;
            height: 100%;
        }
        div.bd {
            height: 80%;
            width: 100%;
            position: relative;
            top: 0;
            left: 0;
        }
        div.gai {
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0;left: 0;
            background: rgba(0, 0, 0, 0.5);
            display: none;
        }
        a.kg {
            width: 50px;
            height: 50px;
            position: absolute;
            left: 50%;
            margin-left: -25px;
            top: 50%;
            margin-top: -25px;
        }
        div.bd:hover div.gai{
            display: block;
        }
    </style>
</head>

<body>
    <div id="root">
        <div class="bd">
            <img src="../../picture/all.jpeg" alt="">
            <div class="gai">
               <a class="kg">
                <img src="../../picture/开关.jpg" alt="">
               </a>
            </div>

        </div>
        <div class="title">
            <h3>dedfrgf</h3>
        </div>
    </div>
</body>
<script>
    new Vue({
        el: '#root',
        data() {
            return {
            }
        },
    })
</script>

</html>